Process and apparatus for comparing in real time phase differences between phasors

ABSTRACT

A numerical comparator is disclosed. The numerical comparator employs numerical techniques based upon the behavior of the cylinder unit to compare phasors in real time. In one application of this invention, the torque signal generated by the numerical comparator, M k+1 , is employed to determine whether a fault has occurred in a transmission line. Another application involves employing the output M k+1  to determine the direction of power flow in the transmission line. In yet another application, the output M k+1  is used to determine whether a voltage or current has exceeded a predetermined threshold.

FIELD OF THE INVENTION

The present invention relates generally to a numerical comparator for comparing two phasor quantities in real time, and more particularly to a numerical comparator for use in protective relaying.

BACKGROUND OF THE INVENTION

Protective relaying generally involves the performance of one or more of the following functions in connection with a protected power or energy system: (a) monitoring the system to ascertain whether it is in a normal or abnormal state; (b) metering, which involves measuring certain electrical quantities; (c) protection, which typically involves tripping a circuit breaker in response to the detection of a short-circuit condition; and (d) alarming, which provides a warning of some impending problem. In connection with these and other ancillary functions, such as fault detection, detection of power flow direction, over-current detection, etc., the protective relaying system must compare phasor quantities (voltages and currents). Generally, the faster such a comparison can be made, the better.

Prior to the present invention, protective relays compared phasor quantities using frequency domain techniques such as the Fourier transform. A primary goal of the present invention is to provide methods and apparatus for comparing phasor quantities in real time.

SUMMARY OF THE INVENTION

The present invention employs numerical techniques, based upon the behavior of the cylinder unit (described below), to compare phasors in real time. The time-dependent procedures disclosed in this specification compare phasors faster than any previously known method.

According to the present invention, a real-time process or apparatus for comparing two phasors, represented by waveforms referred to herein as "S1" "S2" comprises the steps of or means for obtaining a sample (S1_(k)) of the instantaneous magnitude of a first phasor at a first instant of time, and obtaining a sample (S2_(k)) of the instantaneous magnitude of a second phasor at the first instant of time; subsequently, obtaining a sample (S1_(k+1)) of the instantaneous magnitude of the first phasor at a second instant of time, and obtaining a sample (S2_(k+1)) of the instantaneous magnitude of the second phasor at the second instant of time; and then obtaining derived quantities B1_(k), B2_(k), B1_(k+1) and B2_(k+1) from S1_(k), S1_(k+1), S2_(k), S2_(k+1) ; multiplying B1_(k) by B2_(k+1) and multiplying B2_(k) by B1_(k+1) to produce a first product B1_(k) B2_(k+1) and a second product B2_(k) B1_(k+1) ; summing the first and second products to produce a sum; and, finally, scaling the sum to produce a result (M_(k+1)) indicative of a phase difference, if any, between the first and second phasors. The scaling step preferably comprises multiplying the sum by a predetermined number proportional to the sampling period.

The B1 and B2 waveforms are derived from the two inputs to the numerical comparator disclosed herein. These input waveforms are referred as "S1" and "S2". The relationship between S1 and B1 involves the sampled values S1_(k) and S1_(k-1). The relationship between S2 and B2 involves the sampled values S2_(k) and S2_(k-1). In the embodiment of the invention described below, these relationships are: ##EQU1## where "RB" and "LB" represent constants set to make the unit more efficient. The same is true for S2 and B2, i.e., FK1 and FK2 are combined with S2_(k) and S2_(k-1) as shown above for S1.

In preferred embodiments of the invention, the waveforms S1(t) and S2(t) are voltages, currents or a combination of voltages and currents that oscillate sinusoidally.

In one preferred application of this invention, the result M_(k+1) is employed to determine whether a fault has occurred in a transmission line. For example, the result can be employed to detect a phase-to-phase fault in a three phase transmission line. In this case, S1(t) and S2(t) are preferably obtained from the phase-to-phase voltages and the phase currents.

In another preferred application, the result is employed to detect a phase-to-ground fault in a three-phase transmission line system. In this embodiment of the invention, S1(t) and S2(t) are preferably obtained from the phase-to-ground voltages and the phase currents.

Another preferred application of this invention involves employing the result M_(k+1) to determine the direction of power flow in the transmission line. A transmission line can take the form of a set of three conductors going from point "A" to point "B". If a device performing the directional function is positioned at point A, the power flow direction (from A to B or from B to A) should be indicated by the directional device. Typically, there are two types of directional units in use--phase and ground. Several types of directional unit are disclosed herein. The phase directional unit utilizes phase-to-phase voltages and phase currents. The ground directional units are the zero sequence polarized ground directional unit, the negative sequence polarized ground directional unit, and the current polarized ground directional unit. In all these units, the position of the input phasors, S1 and S2, phase-wise, with respect to each other, determines whether the power flow direction is "forward" or "reverse."

In yet another application of the present invention, voltages and/or currents are sampled and the result M_(k+1) is used to determine whether a voltage or current has exceeded a predetermined threshold.

In addition, a predetermined constant (MC) can be subtracted from the result M_(k), and the difference M_(k) -MC can be employed to obtain a signal (θ_(k)) indicative of the energy contained in S1 and S2. It should be noted that the present invention provides the protective relaying art a means to compare the phase relationship between S1 and S2 as well as the energy content of the two combined signals. No other numerical method known in the industry has inherently demonstrated the capacity of determining its operation depending on the energy content of the S1 and S2 inputs. This characteristic is necessary in protective relaying applications in which the operating time is inversely related to the energy content. That is, the relationship between the operating time and the energy content of the input signals is inversely related. Methods such as Fourier filtering, widely used in the industry, do not provide any signs of inverseness. The operating speed is totally independent of the energy content of the inputs.

In sum, the inputs S1 and S2 to the numerical comparator will determine the characteristics of the unit to be obtained. There are numerous applications for the numerical comparator disclosed herein, including the protective relaying applications described above and others.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically depicts the power system inputs for protective relaying applications and/or numerical comparator applications.

FIG. 2A schematically depicts a cylinder unit with inputs S1 and S2.

FIG. 2B depicts the expected torque vs. phase angle (between S1 and S2) characteristics of a cylinder unit.

FIG. 3A is a block diagram of a numerical comparator in accordance with the present invention. This embodiment of the invention computes M_(k+1) in real time, wherein M_(k+1) is analogous to the torque of a cylinder unit.

FIG. 3B depicts the phasor characteristics of the numerical comparator depicted in FIG. 3A. FIG. 3B depicts the phasor characteristics of the cylinder unit depicted in FIG. 2A, which are analogous to the phasor characteristics of the numerical comparator and its output M.

FIG. 4A depicts a circuit that simulates equations that define the inputs to a numerical comparator-based phase-to-phase distance unit in accordance with the present invention.

FIG. 4B is a block diagram of one embodiment of a phase-to-phase distance unit using the delay operator "d".

FIG. 4C depicts a circuit that simulates equations that define the inputs to a numerical comparator based phase-to-ground distance unit in accordance with the present invention.

FIG. 4D is a block diagram of one embodiment of a phase-to-ground unit in accordance with the present invention.

FIG. 5A depicts the required characteristic of a directional unit on the R-X plane. The directional units described in this specification exhibit this characteristic.

FIG. 5B illustrates the idealized cylinder unit and the relationship between M (torque) and θ (angle).

FIGS. 5C to 5F depict the processing performed by the numerical comparator directional units in accordance with the present invention.

FIG. 6A depicts an analog symmetrical filter components.

FIGS. 6B and 6C schematically depict illustrative embodiments of symmetrical components filters in accordance with the present invention. FIG. 6B depicts a Clarke component-based symmetrical components filter. FIG. 6C depicts a direct phase shift symmetrical components filter.

FIG. 7 schematically depicts one embodiment of an over-current unit (which can use voltage inputs as well as current inputs) and its implementation along with a trip comparator in accordance with the present invention. (Note that many units derived with the numerical comparator will use the trip comparator, which is a decision making processor.)

FIG. 8A depicts the mechanical system analog for the trip comparator.

FIG. 8B schematically depicts one embodiment of a numerical trip comparator in accordance with the present invention.

FIG. 9 schematically depicts the functionality of the trip comparator.

FIG. 10 is an exemplary graph of the output of the trip comparator.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS A. Brief Overview

Protective relaying is a science concerned with protecting electrical equipment drawing voltages and currents from a power system. The protective relaying system requires certain inputs from a transmission line 10, which includes three phase conductors A, B, C. FIG. 1 illustrates the traditional way of obtaining the required inputs. As shown, voltage inputs VA, VB, VC are obtained by voltage transformers 12 and current inputs IA, IB, IC are obtained by current transformers 14. The quantities available for the protective relaying apparatus 16 are the phase voltages VA, VB, VC; the zero sequence voltage 3V0=VA+VB+VC; the phase currents IA, IB, IC; and the zero sequence current 3I0=IA+IB+IC.

B. Real-Time Phase Comparator Modeled After Cylinder Unit

A comparator is a device used in protective relays to compare two phasor quantities in phase and/or magnitude. The cylinder unit 18, schematically depicted in FIG. 2A, is a well-known type of comparator used in electromechanical relays. Two outstanding characteristics of the cylinder unit are its insensitivity to DC offset and speed of operation.

When two voltages S1 and S2 are applied to the cylinder unit 18, flux densities B1 and B2 are produced. These flux densities are vectors distributed on the surface of the rotating cylinder. If B1 and B2 are time-dependent, currents are induced in the cylinder, and these currents are proportional to the rate of change of B1 and B2, represented as dB1/dt and dB2/dt, and the angle theta (θ), which is the phase difference between S1 and S2. These cylinder currents are directed toward the positive Z axis (i.e., perpendicular to the plane of FIG. 1). Using the vector force equation (below), the force vector field around the surface of the cylinder can be found:

    F=(I×B)l

The torque on the Z axis is the quantity of interest. This torque can be calculated by summing the torque components.

    M=Σr×F

The torque expressed in terms of flux densities B1, B2 is: ##EQU2## where,

σ=electric conductivity (mhos/m)

π=3.1415

r=cylinder radius

l=cylinder length

T=cylinder thickness.

If two time varying voltages S1(t) and S2(t) are applied to the cylinder unit 18, a time varying flux density B(t) will be produced. The flux density B(t) will have components B1(t) and B2(t) related to S1(t) and S2(t) as: ##EQU3## where N1 and N2 are the number of turns of the S1 and S2 input windings.

It should be mentioned that these equations do not contain any loss mechanism. The following relationships do contain losses and can be used to relate the S (inputs) and B terms. ##EQU4## where LB and RB are constants that can be determined to make the model more efficient.

If S1(t) and S2(t) are sine waves, such as

S1(t)=Sin (ωt)

S2(t)=Sin (ωt+δ),

the torque in P.U. (per unit) terms will be:

M=0 when δ=0

M=-1 when δ=90°

M=0 when δ=180°

M=1 when δ=270°

as depicted in FIG. 2B.

To apply the above equations to protective relays based on microprocessors and/or microcontrollers, they can be discretized using the trapezoidal rule: ##EQU5## and the torque can be expressed as:

    M.sub.k =B2.sub.k B1.sub.k-1 -B1.sub.k B2.sub.k-1

where:

k+1=actual sample

k=previous sample

Δt=sampling period.

FIG. 3A is a block diagram of a numerical comparator circuit or system 20 for computing M_(k). In the system of FIG. 3A, "d" denotes a delay unit; "Σ" denotes a summing unit; "II" denotes a multiplier; and "FK1", "FK2" are amplifiers. The output M_(k) of the system 20 represents the real time torque M_(k) of a comparator having the phasor characteristics depicted in FIG. 3B, which illustrates the operating characteristics of the numerical comparator 20. Having S1 as the reference, a phase difference of 0 to negative 180° indicates operation of the unit. A phase difference of 0 to positive 180° indicates no-operation or restraint of the unit.

This procedure can be employed in distance relays, pilot wire relays, directional relays, over-current relays, over/under voltage relays, etc., where a real-time comparison of two phasor quantities is desired. In specific applications of this invention, mechanical influences to the model, such as a restraining spring force, friction force, and/or bias force, can be included as necessary.

C. Distance Unit For Fault Detection

A procedure for obtaining distance units employing a numerical comparator is described next.

Protective relaying concerns the detection of faults in power apparatus. In transmission line relaying, distance relays are used to detect several types of faults in the transmission line. These devices detect faults in transmission lines up to certain reaches or distances. In general, these devices measure the impedance, which is proportional to the distance from the relay location to the fault (hence the name "distance unit"). The digital/numerical distance units derived by this procedure detect faults faster than prior art fault detectors, but otherwise behave like known electromechanical distance units. The numerical methods disclosed herein are less vulnerable to transients and noise than any other time domain method. This is due to the analogy to the cylinder unit, which has shown to operate well under transients.

1. Phase-To-Phase Unit

To detect phase-to-phase faults, the inputs to the numerical comparator are:

    S1=VA-VB-(IA-IB)

    S2=VC-VB-(IC-IB)

The circuit depicted in FIG. 4A simulates these equations. Therefore, S1(t) and S2(t) may be derived from the phase-to-phase voltages and currents as follows: ##EQU6##

If we make the equations discrete and apply them to the cylinder unit model derived above, we obtain: ##EQU7## which are the inputs to the numerical comparator (also called the "torque generator") derived above. S1_(k) and S2_(k) are then used to obtain B1_(k), B2_(k) and M_(k) as described above.

The above equations are discrete realizations of a phase-to-phase distance unit that will detect all types of faults involving two phases and some phase-to-phase-to-ground faults.

FIG. 4B is a block diagram of one implementation of the above equations for a phase-to-phase distance unit. Notice that the delta currents Iab and Icb are sampled, delayed and combined with the sampled and delayed delta voltages Vab and Vcb. The combination for each are the inputs to a numerical comparator 20a, which is like the numerical comparator 20 described above. The output of the numerical comparator is coupled to a clipping unit denoted "MM", which forms part of a trip comparator 30 (described below). The equations for B1 and B2 are implemented and the cross multiplication of B1_(k) times B2_(k+1) and B1_(k+1) times B2_(k) is employed to obtain the M_(k) term. The amplifiers are labelled "A00", "B00", "CC", "EE", "FF", "FK1", and "FK2" in accordance with their gains, as set forth in the following list:

A00=Rc+Lc/Δt

B00=Lc/Δt

CC=Δt² /l

EE=1/(1+Δt² KC/l+Δt KD/l)

FF=2+Δt KD/l

FK1=(2 LB-Δt RB)/Δt

FK2=Δt/(Δt RB+2 LB).

(Note that CC, EE and FF are related to the trip comparator).

2. Phase-To-Ground Unit

The inputs to a well known means for detecting phase-to-ground faults are:

    S1=VA-(IA-K0I0)Zc

    S2=VC-VB

where ##EQU8##

The circuit schematically depicted in FIG. 4C simulates the above equations. If these equations are made discrete and are applied to the numerical comparator equations, we obtain: ##EQU9## which are the inputs to the numerical comparator derived above.

FIG. 4D is a block diagram of one embodiment of a phase-to-ground unit in accordance with the present invention. The currents and voltages shown are sampled and combined in the adders as shown, and then input to the numerical comparator 20b. The B1 and B2 terms are then cross multiplied and M_(k) is obtained and fed to the trip comparator 30 (described below). The amplifiers are labelled "A01", "B01", "C01", "E01", "CC", "EE", and "FF" in accordance with their gains, as set forth in the following list:

A01=Rc+Lc/Δt

B01=Lc/Δt

C01=(Kr Rc-Kl Xc)/3+(Kr Xc+Kl RC)/3ω Δt

E01=(Kr Xc+Kl RC)/3ω Δt

CC=1/(1+Δt² KC/l+Δt KD/l)

EE=Δt² /l

FF=2+Δt KD/l.

In sum, a general procedure for obtaining impedance units (distance units) has been described. The units obtained are high speed since they require only three sampling periods (k-1, k, k+1) to obtain a trip criterion, regardless of the sampling frequency. Finally, many other distance units can be obtained by the procedure disclosed herein. The above-described distance units, the phase-to-phase distance unit and the ground distance unit (also referred as the quadrature polarized ground distance unit), are just two examples of the different principles used in protective relaying to obtain distance units. The procedure described above can produce any type of distance unit now used in industry requiring the comparison of two phasor quantities.

D. Directional Unit

Directional units are devices required in protective relaying to indicate the direction of power flow. Ground directional units derived from the numerical comparator disclosed above are fast, making them ideal for protective relaying applications and in combination with distance units derived from the numerical comparator. FIG. 5A illustrates the characteristics of such directional units on the R-X plane. In this example, the forward direction indicates that power is flowing into the transmission line. The reverse direction indicates that power is flowing from the transmission line.

Directional units come in two categories, phase directional units and ground directional units. Phase directional units operate under all conditions. Ground directional units operate only when there is an unbalance in the power system. The following directional units have been developed:

1. Negative Sequence Polarized Directional Unit

Using the output of a numerical symmetrical components filter, the following equations are used to implement a negative sequence polarized directional unit:

    B1.sub.k =FK2 (V2.sub.k +2 V2.sub.k-1 +V2.sub.k-2 -FK1 B1.sub.k-1)

    B2.sub.k =FK2 (I2.sub.k +2 I2.sub.k-1 +I2.sub.k-2 -FK1 B2.sub.k-1)

    M.sub.k =B2.sub.k B1.sub.k-1 -B1.sub.k B2.sub.k-1

In the above equations, V2 and I2 are outputs of the numerical symmetrical components filter, an example which is described below.

2. Zero Sequence Polarized Directional Unit

The following equations can be used to implement a zero sequence polarized ground directional unit:

    B1.sub.k =FK2 (3V0.sub.k +2·3V0.sub.k-1 +3V0.sub.k-2 -FK1 B1.sub.k-1)

    B2.sub.k =FK2 (AA 3I0.sub.k +AB 3I0.sub.k-1 +BB 3I0.sub.k-2 -FK1 B2.sub.k-1)

    M.sub.k =B2.sub.k B1.sub.k-1 -B1.sub.k B2.sub.k-1

where: ##EQU10##

In the above equations, 3V0=VA+VB+VC and 3I0=IA+IB+IC.

3. Current Polarized Ground Directional Unit

If Ipol(t) is an input from a grounding point in the power system, a ground directional unit can be implemented with the following equations: ##EQU11##

4. Phase Directional Unit

A phase directional unit can be implemented with the following equations:

    B1.sub.k =FK2(-VCB.sub.K -2VCB.sub.K-1 -VCB.sub.K-2 -FK1B1.sub.K-1)

    B2.sub.2 =FK2(AA IA.sub.K +ABIA.sub.K-1 +BBIAK-2-FK1 B2.sub.K-1)

    M.sub.k =B1.sub.k-1 B2.sub.k -B2.sub.k-1 B1.sub.k

where: ##EQU12## and VCB is the delta voltage (VC-VB).

Other directional units can be implemented with the numerical comparator disclosed above. The above equations determine the "torque" of the unit, which can be combined with a numerical trip comparator.

FIGS. 5C to 5F depict the processing performed for the directional units.

FIG. 5C illustrates the data flow for the negative sequence polarized ground directional unit, which comprises a numerical comparator 20c and a trip comparator 30. The V2 and I2 inputs to the numerical comparator 20c are derived from a symmetrical components filter. The implementation of the equations of the negative sequence polarized ground directional units combines the samples of V2 and I2 to produce the B1 and B2 terms that are cross multiplied to obtain the M_(k) term, which is fed to the trip comparator 30 The amplifiers labelled "CC", "EE", "FF", "FK1", and "FK2" have the following gains:

CC=1/(1+Δt² KC/l+Δt KD/l)

EE=Δt² /l

FF=2+Δt KD/l

FK1=(2 LB-Δt RB)/Δt

FK2=Δt/(Δt RB+2 LB).

FIG. 5D illustrates the data flow of the zero sequence polarized ground directional unit. The 3V0 and 3I0 terms are derived from the actual power system samples (3V0=VA+VB+VC and 3I0=IA+IB+IC). The implementation of the equations of the zero sequence polarized ground directional unit combines the samples of 3V0 and 3I0 to produce the B1 and B2 terms that are input to the numerical comparator 20d and cross multiplied to obtain the M_(k) term fed to the trip comparator 30. The amplifiers labelled "AA55", "BB55" and "AB55" have the following gains:

AA55=sqrt(3)/4-1/(4II f Δt)

BB55=sqrt(3)/4+1/(4II f Δt)

AB55=AA55+BB55.

FIG. 5E illustrates the data flow of the current polarized ground directional unit comprising a numerical comparator 20e and a trip comparator 30. The 3I0 term input to the numerical comparator is derived from the actual power system samples (3I0=IA+IB+IC) and the Ipol samples are the actual samples of a current obtained from a suitable grounding point of the power system. The implementation of the equations of the current polarized ground directional unit combines the samples of 310 and Ipol to produce the B1 and B2 terms that are cross multiplied to obtain the M_(k) term fed to the trip comparator.

FIG. 5F illustrates the data flow of the phase directional unit (phase A) comprising a numerical comparator 20f and a trip comparator 30. The VCB term input to the numerical comparator is VC-VB, where VC and VB are the actual samples from the C and B phases. IA is the phase A current. This implementation of the equations of the phase directional unit combines the samples of VCB and IA to produce B1 and B2 terms that are cross multiplied to obtain the M_(k) term fed to the trip comparator. The amplifiers labelled "AA52", "BB52" and "AB52" have the following gains:

AA52=1/4+sqrt(3)/(4II f Δt)

BB52=1/4+sqrt(3)/(4II f Δt)

AB52=AA52+BB52.

The above-described procedures are exemplary procedures for directional units. Those skilled in this art will recognize that other directional units can be obtained with the invention disclosed herein.

E. Symmetrical Components Filter

Symmetrical component quantities are required for fast and reliable relaying of different parts of the power system. The procedures described below provide the symmetrical components in a time-dependent manner. These procedures are required employed in fast directional units and/or distance units. Three procedures will now be described.

1. Simulation of Existing Analog Filter

FIG. 6A depicts an analog filter. The positive and negative sequence components in discrete form are given by the following equations: ##EQU13## Constants C1, R1, C2 and R2 can be fine-tuned to obtain the corresponding optimized equations. There will be a set of R1, C1, R2 and C2 constants that produce the smallest error and the correct phase shift.

2. Direct Phase Shift

The symmetrical component equations are:

    I1=1/3 (I.sub.A +a IB+a.sup.2 IC)

    I2=1/3 (IA+a.sup.2 IB+a IC)

These equations can be implemented by using the phase shifting identities, ##EQU14## Therefore, in discrete form: ##EQU15##

3. Clarke Components Derivation

By definition, the Clarke components are: ##EQU16## It follows that:

    3I1=1/2(Iα+jIβ)

    3I2=1/2(Iα-jIβ)

Using the operator: ##EQU17## it follows that: ##EQU18## Making the equations discrete: ##EQU19## This implementation is the simplest. However, a further step to "align" the time with respect to the derivatives can be performed to reduce errors and increase the accuracy of the method: ##EQU20##

FIGS. 6B and 6C schematically depict illustrative embodiments of symmetrical components filters in accordance with procedures 3 (Clarke components) and 2 (Direct phase shift), respectively.

FIG. 6B illustrates the combination of IA, IB and IC samples to obtain the Iα and Iβ components and later manipulate them, according to the above equations, to obtain the I1 and I2 (positive and negative) components of the currents. The same process could be performed for voltages to obtain the positive and negative sequence components of the voltages. The amplifiers labelled "A" and "B" have the following gains:

A=1/4

B=1/(4II f αt).

FIG. 6C illustrates the combination of IA, IB and IC samples, using the direct phase shift equivalent (the A and B constants), to obtain the I1 and I2 components of the currents. The same procedure could be followed to obtain the positive and negative sequence components of voltages. In this embodiment, amplifiers "A" and "B" have the following gains:

A=-1/2

B=sqrt(3)/(4II f Δt).

F. Over-Current Unit

The over-current unit disclosed below employs a numerical algorithm that is fast and unaffected by DC offsets. It can be used as a level detector for voltage or current.

To implement a single input over-current unit, one of the numerical comparator inputs should be phase-shifted. Using this criterion, the following equations can be employed to provide an over-current unit free of the effects of DC offset. This unit is extremely fast.

    B1.sub.k =FK2 (IA.sub.k +IA.sub.k-1 -FK1 B1.sub.k-1)

    B2.sub.k =FK2 (IA.sub.k +2IA.sub.k-1 +IA.sub.k-2 -FK1 B2.sub.k-1)

    M.sub.k =B1.sub.k-1 B2.sub.k -B2.sub.k-1 B1.sub.k

This output "torque" (M_(k)) can be fed into the numerical trip comparator and the opposing torque constant, MC, can be adjusted for the trip level. In the above equations, IA could be a current, voltage, or any other power system quantity (such as a symmetrical component).

FIG. 7 schematically depicts one embodiment of an over-current unit 20g and its implementation in accordance with the present invention. The inputs to the numerical comparator, in this embodiment, are derived as shown from the single quantity IA. The samples are combined to obtain the B1 and B2 quantities, as expressed in the above equations. The output, M_(k), can be used to feed the numerical trip comparator 30 described below. Amplifiers "FK1" and "FK2" have the following gains:

FK1=(2 LB-Δt RB)/Δt

FK2=Δt/(Δt RB+2 LB)

RB=1.0

LB=0.001.

G. Trip Comparator

The procedure described next can be used in the implementation of a numerical trip comparator relay unit. The numerical trip comparator is a complement of all the embodiments described above. The trip comparator makes the trip decision. In other words, it decides when to indicate the operation of the unit to which it is connected.

A numerical model of the travel of an electromechanical cylinder unit contact should resemble the electro-mechanical operation of the cylinder unit. The numerical comparator depicted in FIG. 3A was employed to develop the numerical trip comparator disclosed herein.

In FIG. 8A:

θ=the angle of travel,

θ_(T) =the trip angle,

M=the electro-mechanical torque,

MS=the opposing spring (force) torque,

MC=the constant opposing torque,

I=the moment of inertia of the cylinder.

The electro-mechanical equation for the model is: ##EQU21## If the equation is discretized, θ_(k) can be expressed as: ##EQU22## In the numerical trip comparator, the following conditions are applied:

1. If (M_(k) -MC)<0, then the next θ_(k) is zero.

2. If θ_(k) >θ_(T), then the next θ_(k) is set to θ_(T), and a trip is issued.

FIG. 8B schematically depicts one embodiment of a numerical trip comparator 30 in accordance with the present invention. The trip comparator receives as input the torque M_(k) (generated in any of the above-described units) and, as shown in the FIG. 8B, it is limited to -MM<M_(k) <+MM and then the opposing bias torque MC is subtracted from M_(k). The rest of the circuitry implements the above equations. The output θ_(k) is later compared to θ_(T) for a trip, as mentioned in condition 2. The gains of amplifiers "CC", "EE", and "FF" are disclosed above.

Referring now to FIGS. 9 and 10, which illustrate the operation of the trip comparator, this unit issues a logic "0" (false) if the unit has not operated and issues a logic "1" (true) if the unit has operated. The variable "0" is the input to the block and is compared to upper and lower limits. It should be mentioned that FIG. 10 illustrates typical limits; however, other limits can be used.

If the instantaneous value of 0 is greater than 0.6 (in this example a logic "1" (true) is issued to the protective relaying logic in the microprocessor-based apparatus. If it is less than 0.6, a logic "0" (false) is issued to the protective relaying logic in the microprocessor-based apparatus. The limits of the variable are from 0 to 1 in this example.

Those skilled in the art will appreciate that the present invention can be embodied in apparatus and processes not exactly like those described hereinabove. The numerical trip comparator is used in protective relaying to implement numerically the function(s) of a phase comparator. The cylinder unit in electromechanical relays is the building block of many different units used in protective relaying, including distance units, directional units, over/undercurrent units, over/undervoltage units, pilot wire and other specialized applications. The numerical comparator is another phase comparator unit that can be used to develop relaying units like the ones discussed above.

The development of the numerical comparator algorithms described above resulted from the analysis of the behavior or the cylinder unit, but the equations have been modified. They are not an exact model of the cylinder unit. Indeed, the flexibility of the equations, factors, multiplier, ranges, etc., which are the equations to be implemented in microprocessor based apparatus, allow the designer to accommodate the behavior of the unit with more flexibility than an actual cylinder unit. 

I claim:
 1. A real-time process for comparing two phasors, each said phasor being represented by a waveform (S1(t), S2(t)) characterized by a magnitude and a phase angle, comprising the steps of:(a) obtaining a sample (S1_(k)) representative of the magnitude of a first phasor at a first instant of time, and obtaining a sample (S2_(k)) representative of the magnitude of a second phasor at said first instant of time; (b) obtaining a sample (S1_(k+1)) representative of the magnitude of said first phasor at a second instant of time, and obtaining a sample (S2_(k+1)) representative of the magnitude of said second phasor at said second instant of time; (c) obtaining derived quantities B1_(k), B2_(k), B1_(k+1) and B2_(k+1) from S1_(k), S1_(k+1), S2_(k), S2_(k+1) ; (d) multiplying B1_(k) by B2_(k+1) and multiplying B2_(k) by B1_(k+1) to produce a first product B1_(k) B2_(k+1) and a second product B2_(k) B1_(k+1) ; (e) summing said first and second products to produce a sum; and (f) scaling said sum to produce a result (M_(k+1)) indicative of a phase difference, if any, between said first and second phasors.
 2. A process as recited in claim 1, wherein B1_(k) and B2_(k) are derived in accordance with the following equations:

    B1.sub.k =FK2 [S1.sub.k +S1.sub.k-1 -FK1 B1.sub.k-1 ]

    B2.sub.k =FK2 [S2.sub.k +S2.sub.k-1 -FK1 B2.sub.k-1 ]

wherein FK1 and FK2 are constants set in accordance with prescribed equations.
 3. A process as recited in claim 2, wherein FK1 and FK2 are determined by: ##EQU23## where RB and LB are constants.
 4. A process as recited in claim 1, wherein S1_(k) and S2_(k) are obtained by sampling a transmission line.
 5. A process as recited in claim 4, wherein said waveforms S1(t) and S2(t) are voltages or currents that oscillate sinusoidally, or a combination of voltages and currents.
 6. A process as recited in claim 4, further comprising the step of employing said result M_(k+1) to determine whether a fault has occurred on said transmission line.
 7. A process as recited in claim 6, wherein said result is employed to detect a phase-to-phase fault in a three-phase transmission line system; and S1(t), S2(t) are obtained from the phase-to-phase voltages and the phase currents.
 8. A process as recited in claim 6, wherein said result is employed to detect a phase-to-ground fault in a three-phase transmission line system; and S1(t), S2(t) are obtained from the phase-to-ground voltages and the phase currents.
 9. A process as recited in claim 4, further comprising the step of employing said result M_(k+1) to determine the direction of power flow in said transmission line.
 10. A process as recited in claim 4, further comprising the step of employing said result M_(k+1) to determine whether a voltage or current on said transmission line has exceeded a predetermined threshold.
 11. A process as recited in claim 4, further comprising the step of subtracting a predetermined constant (MC) from said result M_(k+1), and employing the difference M_(k+1) -MC to obtain a signal (θ_(k+1)) indicative of the energy contained in the difference signal S1(t)-S2(t).
 12. A process as recited in claim 1, wherein the scaling step comprises multiplying said sum by a predetermined number proportional to the sampling period.
 13. An apparatus for comparing two phasors in real-time, each said phasor being represented by a waveform (S1(t), S2(t)) characterized by a magnitude and a phase angle, comprising:(a) sampling means for obtaining a sample (S1_(k)) representative of the magnitude of a first phasor at a first instant of time, obtaining a sample (S2_(k)) representative of the magnitude of a second phasor at said first instant of time, obtaining a sample (S1_(k+1)) representative of the magnitude of said first phasor at a second instant of time, and obtaining a sample (S2_(k+1)) representative of the magnitude of said second phasor at said second instant of time; (b) means for obtaining derived quantities B1_(k), B2_(k), B1_(k+1) and B2_(k+1) from S1_(k), S1_(k+1), S2_(k), S2_(k+1) ; (c) multiplying means for multiplying B1_(k) by B2_(k+1) and multiplying B2_(k) by B_(k+1) to produce a first product B1_(k) B2_(k+1) and a second product B2_(k) B1_(k+1) ; and (d) summing means for summing said first and second products to produce a result (M_(k+1)) indicative of a phase difference, if any, between said first and second phasors.
 14. An apparatus as recited in claim 13, further comprising scaling means for scaling said result (M_(k-1)), wherein the scaling means multiplies said result by a predetermined number proportional to the sampling period.
 15. An apparatus as recited in claim 13, wherein B1_(k) and B2_(k) are derived in accordance with the following equations:

    B1.sub.k =FK2 [S1.sub.k +S1.sub.k-1 -FK1 B1.sub.k-1 ]

    B2.sub.k =FK2 [S2.sub.k +S2.sub.k-1 -FK1 B2.sub.k-1 ]

wherein FK1 and FK2 are constants set in accordance with prescribed equations.
 16. An apparatus as recited in claim 15, wherein FK1 and FK2 are determined by: ##EQU24## where RB and LB are constants.
 17. An apparatus as recited in claim 13, wherein S1_(k) and S2_(k) are obtained by sampling a voltage or current from a transmission line.
 18. An apparatus as recited in claim 17, wherein said waveforms S1(t) and S2(t) are voltages or currents that oscillate sinusoidally, or a combination of voltages and currents.
 19. An apparatus as recited in claim 17, further comprising means for employing said result M_(k+1) to determine whether a fault has occurred on said transmission line.
 20. An apparatus as recited in claim 19, wherein said result is employed to detect a phase-to-phase fault in a three-phase transmission line system; and S1(t), S2(t) are obtained from the phase-to-phase voltages and the phase currents.
 21. An apparatus as recited in claim 19, wherein said result is employed to detect a phase-to-ground fault in a three-phase transmission line system; and S1(t), S2(t) are obtained from the phase-to-ground voltages and the phase currents.
 22. An apparatus as recited in claim 17, further comprising means for employing said result M_(k+1) to determine the direction of power flow in said transmission line.
 23. An apparatus as recited in claim 22, in combination with a symmetrical components filter, wherein sequence components output by said filter are inputs to the apparatus.
 24. An apparatus as recited in claim 17, further comprising means for subtracting a predetermined constant (MC) from said result M_(k-1), and employing the difference M_(k+1) -MC to obtain a signal (θ_(k-1)) indicative of the energy contained in the difference signal S1(t)-S2(t).
 25. An apparatus as recited in claim 17, further comprising means for employing said result M_(k+1) to determine whether a voltage or current on said transmission line has exceeded a predetermined threshold.
 26. A real-time process for determining a phase difference between two waveforms, each of said waveforms having a magnitude and a phase angle, comprising the steps of:(a) obtaining a plurality of samples of each said two waveforms representative of the magnitude of each said two waveforms at at least two different times; and (b) on the basis of said samples, computing a value M_(k+1) indicative of the phase difference between said two waveforms.
 27. A process defined in claim 26 wherein said waveforms are voltages or currents that oscillate sinusoidally, or a combination of voltages and currents.
 28. A process as defined in claim 26, wherein said step of obtaining a plurality of samples of said two waveforms comprises:(a1) obtaining a sample (S1_(k)) representative of the magnitude of a first of said waveforms at a first instant of time, and obtaining a sample (S2_(k)) representative of the magnitude of a second of said waveforms at said first instant of time; (a2) obtaining a sample (S1_(k+1)) representative of the magnitude of said first waveform at a second instant of time, and obtaining a sample (S2_(k+1)) representative of the magnitude of said second waveform at said second instant of time.
 29. A process as defined in claim 28, wherein step (b) comprises:(b1) obtaining derived quantities B1_(k), B2_(k), B1_(k+1) and B2_(k+1) from S1_(k), S1_(k+1), S2_(k), S2_(k+1) ; (b2) multiplying B1_(k) by B2_(k+1) and multiplying B2_(k) by B1_(k+1) to produce a first product B1_(k) B2_(k+1) and a second product B2_(k) B1_(k+1) ; (b3) summing said first and second products to produce a sum; and (b4) scaling said sum to produce the value of M_(k+1).
 30. A process as defined in claim 29, wherein B1_(k) and B2_(k) are derived in accordance with the following equations:

    B1.sub.k =FK2 [S1.sub.k +S1.sub.k-1 -FK1 B1.sub.k-1 ]

    B2.sub.k =FK2 [S2.sub.k +S2.sub.k-1 -FK1 B2.sub.k-1 ]

wherein FK1 and FK2 are constants set in accordance with prescribed equations.
 31. A process as defined in claim 30, wherein FK1 and FK2 are determined by: ##EQU25## where RB and LB are constants.
 32. A process as defined in claim 29, wherein the scaling step comprises multiplying said sum by a predetermined number proportional to the sampling period.
 33. A process as defined in claim 28 wherein S1_(k) and S2_(k) are obtained by sampling a transmission line.
 34. A process as recited in claim 33, further comprising the step of subtracting a predetermined constant (MC) from M_(k+1), and employing the difference M_(k+1) -MC to obtain a signal (θ_(k+1)) indicative of the energy contained in a difference signal S1(t)-S2(t).
 35. A process as recited in claim 34 further comprising the step of employing said value M_(k+1) to determine whether a fault has occurred on said transmission line.
 36. A process as recited in claim 35, wherein M_(k+1) is employed to detect a phase-to-phase fault in a three-phase transmission line system; and S1(t), S2(t) are obtained from the phase-to-phase voltages and the phase currents.
 37. A process as recited in claim 35 wherein M_(k+1) is employed to detect a phase-to-ground fault in a three-phase transmission line system; and S1(t), S2(t) are obtained from the phase-to-ground voltages and the phase currents.
 38. A process as recited in claim 34, further comprising the step of employing M_(k+1) to determine the direction of power flow in said transmission line.
 39. A process as recited in claim 33, further comprising the step of employing M_(k+1) to determine whether a voltage or current on said transmission line has exceeded a predetermined threshold. 